Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistency between batching and fiber state #1706

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

mikearnaldi
Copy link
Member

@mikearnaldi mikearnaldi commented Nov 26, 2023

Improve consistency between request batching and fiber environment.

In prior releases request batching required operators that act on fiber context such as Effect.locally to be aware of batching in order to avoid bugs where the effect executed post batching would lose the fiber environment (context, refs, and flags).

This change restructure how batching internally works, inside the fiber we now slice up the stack and restore the exact context that was destroyed, by rewriting the internals of forEach batching is now transparent to any other function that deals with fiber state.

Copy link

changeset-bot bot commented Nov 26, 2023

🦋 Changeset detected

Latest commit: 00c053c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
effect Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mikearnaldi mikearnaldi changed the title Preliminary work Consistency between batching and fiber state Nov 27, 2023
@mikearnaldi mikearnaldi force-pushed the chore/work-on-batching branch 9 times, most recently from 7cd874d to c31fc70 Compare November 28, 2023 22:12
@mikearnaldi mikearnaldi marked this pull request as ready for review November 28, 2023 22:13
@mikearnaldi mikearnaldi merged commit 8a1e98c into main Nov 29, 2023
9 checks passed
@mikearnaldi mikearnaldi deleted the chore/work-on-batching branch November 29, 2023 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant